package com.jetpackframework.webview;

import android.content.Context;
import android.content.res.Configuration;

import com.gwm.annotation.router.AutoService;
import com.jetpackframework.applicationdelegate.ApplicationDelegate;
import com.jetpackframework.applicationdelegate.BaseApplicationDelegate;
import com.kingja.loadsir.callback.HintCallback;
import com.kingja.loadsir.callback.ProgressCallback;
import com.kingja.loadsir.core.LoadSir;
@AutoService(ApplicationDelegate.class)
public class WebAppDalagate extends BaseApplicationDelegate {
    @Override
    public void onCreate() {
        ProgressCallback loadingCallback = new ProgressCallback.Builder()
                .setTitle("Loading")
                .build();

        HintCallback hintCallback = new HintCallback.Builder()
                .setTitle("Error")
                .setSubTitle("Sorry, buddy, I will try it again.")
                .build();
        LoadSir.beginBuilder()
                .addCallback(hintCallback)//添加各种状态页
                .addCallback(loadingCallback)
                .setDefaultCallback(ProgressCallback.class)//设置默认状态页
                .commit();
    }

    @Override
    public void onLowMemory() {

    }

    @Override
    public void onTrimMemory(int level) {

    }

    @Override
    public void onTerminate() {

    }

    @Override
    public void onConfigurationChanged(Configuration newConfig) {

    }

    @Override
    public void onBaseContextAttached(Context base) {

    }

    @Override
    public void exit() {

    }
}
